package com.jn.exam.question.service.impl;

import com.jn.exam.question.entity.PaperLog;
import com.jn.exam.question.mapper.PaperLogMapper;
import com.jn.exam.question.service.PaperLogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 江南大学1033190417
 * @since 2022-02-07
 */
@Service
public class PaperLogServiceImpl extends ServiceImpl<PaperLogMapper, PaperLog> implements PaperLogService {

    @Override
    public boolean savePaperLog(String message, String paperId) {
        PaperLog paperLog = new PaperLog();
        paperLog.setPaperId(paperId);
        paperLog.setInfo(message);
        int insert = baseMapper.insert(paperLog);
        if (insert==1){
            return true;
        }
        return false;
    }
}
